package server.core;

import java.util.Iterator;
import java.util.List;

public class User {

	private String	name;
	private String	username;
	private String	password;
	private int		groupId;
	private String	email;

	public void setName(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getPassword() {
		return password;
	}

	public void setGroupId(int groupId) {
		this.groupId = groupId;
	}

	public int getGroupId() {
		return groupId;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getEmail() {
		return email;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getUsername() {
		return username;
	}

	public void makeUserFromData(List<String> data) {
		Iterator<String> it = data.iterator();

		setUsername(it.next());
		setName(it.next());
		setPassword(it.next());
		setEmail(it.next());
		setGroupId(Integer.parseInt(it.next()));
	}
}
